// 展示某条数据的组件封装
import React from 'react';

import { CartItems, CartItem } from './'
// 子组件 props CartItem接口 做类型约束

interface Props {
  item: CartItem;
  checketd: boolean;
  onCheckedChange: onCheckedChange<CartItem>
}

const ItemCard = React.memo((props: Props) => {
  const { item, checketd, onCheckedChange } = props
  const { price, name } = item
  return (
    <div className="item-card">
      <div className="checkbox-wrap">
        <input
          type="checkbox"
          checked={checketd}
          onChange={onCheckedChange}
        />
      </div>
      <div className="item-info">

      </div>
    </div>
  )
})